<%@page import="com.css.core.configuration.Environment"%>
<%@ page language="java" pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="ww" uri="webwork" %>
<% 
	if(session.getAttribute(Environment.SESSION_LOGIN_KEY)==null){
		response.sendRedirect("login.jsp");
	}
%>
<!DOCTYPE html>
<!--[if IE 7]> <html lang="en" class="ie7 no-js"> <![endif]-->
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<!-- BEGIN HEAD -->
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<link rel="shortcut icon" href="favicon.ico" />
 		<!-- Site CSS -->
  		<link href="cssuinew/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
  		<link href="cssuinew/layout/default.css" rel="stylesheet"/>
  		<link href="cssuinew/layout/document.css" rel="stylesheet"/>
  		<link href="cssuinew/layout/font-awesome.min.css" rel="stylesheet"/>
  		<ww:if test="#session.sUser.skinId == null or ''.equals(#session.sUser.skinId)">
  		<link class="current" href="cssuinew/themes/metro/icons.css" rel="stylesheet" />
  		<link class="current" href="cssuinew/themes/metro/style.css" rel="stylesheet"/>
  		</ww:if>
  		<ww:else>
  		<link class="current" href="cssuinew/themes/<ww:property value="#session.sUser.skinId"/>/icons.css" rel="stylesheet" />
  		<link class="current" href="cssuinew/themes/<ww:property value="#session.sUser.skinId"/>/style.css" rel="stylesheet"/>
  		</ww:else>
  	    <link class="current" href="cssuinew/themes/metro/bbs/bbs.css" rel="stylesheet"/> 
  		 <script type="text/javascript" src="cssuinew/plugins/jquery-1.10.2.min.js"></script>
  	
  	</head>
	<body class="page-header-fixed">
	<script>
	if(!! navigator.userAgent.match(/MSIE 7/)) {
		document.location.href = "msgie7.jsp";
	}
	g_rel='<%=request.getParameter("r")%>';
	g_url='<%=request.getParameter("u")%>';
	</script>
    	<div class="header navbar navbar-inverse navbar-fixed-top">
			<div class="navbar-inner">
				<div class="container-fluid">
					<a class="brand" href="explorer.jsp"><%--<img src="custom/metro/brand.png" />--%>领导班子考评系统</a>
					<ul class="nav pull-right">
						<!--<li class="top_sch"><input type="text" id="tabkey"><i class="top_sch_icon" onclick="tabSearch();"></i></li>
						--><li class="dropdown">
						   <ww:if test="#session.sUser.loginName == 'devadmin'">
							<a class="user" title="清空缓存" href="javascript:clearCache();">
								<i class="fa fa-refresh" aria-hidden="true"></i>&nbsp;&nbsp;清空缓存
							</a>
							</ww:if>
						</li>
						<li class="dropdown user">
							<ww:property value="#session.sUser.realName" />
						</li>
<%-- 						<li class="dropdown">
							<a href="dirLetterReceive.action" rel="ZNX" target="cssTab" title="站内信" refresh="true">
							站内信(<span id="letterCounts"><ww:property value="@com.css.apps.letter.service.LetterService@getUnReadCounts()" default="0"/></span>)
							</a>
						</li> --%>
						
						<li class="dropdown">
							<a class="dropdown" title="主题" href="javascript:showTheme();">
							<!-- <i class="icon-setting"></i> -->主题
							</a>
						</li>
						<li class="dropdown">
							<a class="user" title="设置" href="javascript:showSetting();">
							<!-- <i class="icon-setting"></i> -->设置
							</a>
						</li>
						<li class="dropdown">
						 <ww:if test="#session.sUser.loginName != 'devadmin' && #session.sUser.loginName != 'sysadmin' && #session.sUser.loginName != 'secadmin'
						 && #session.sUser.loginName != 'audadmin' && #session.sUser.loginName != 'bizadmin'">
							<a class="user" title="设备管理" href="javascript:showDevice();">
							<!-- <i class="icon-setting"></i> -->设备管理
							</a>
						 </ww:if>
						</li>
						<li class="dropdown">
						 <ww:if test="#session.sUser.loginName == 'sysadmin'">
							<a class="user" title="设备统计" href="javascript:sumDevice();">
							<!-- <i class="icon-setting"></i> -->用户设备统计
							</a>
						 </ww:if>
						</li>
						<li class="dropdown">
							<a class="user" title="退出" href="<ww:property value="#session[@com.css.apps.base.user.action.login.SSO@CONST_SSO_LOGOUT]" default="quit.action"/>">
							<!-- <i class="icon-quit"></i> -->退出
							</a>
						</li>
					</ul>
				</div>
			</div>
		</div>
    	<div class="page-container">
				<div class="page-sidebar" role="main" style="overflow: auto;">
					<div class="folder"><a></a></div>
					<ul class="page-sidebar-menu">
						<li class="start active ">
							<a href="firstpage.jsp" rel="home" id="fpTab" target="cssTab" title="首页" refresh="true">
							<i class="icon_home"></i> 
							<span class="title">首&nbsp;&nbsp;&nbsp;&nbsp;页</span>
							<span class="selected"></span>
							</a>
						</li>
					    <li style="display:none;">
							<a href="getIndex.action?portalType=2"  rel="customizeportal"  target="cssTab" title="首页门户" refresh="true">
							<i class="icon_home"></i> 
							<span class="title">首&nbsp;页&nbsp;门&nbsp;户</span>
							<span class="selected"></span>
							</a>
						</li>
						 <ww:property value="@com.css.apps.base.common.util.MenuUtil@getUserMenuContent()"/>
					</ul>
      			</div>
				<div class="page-content">
					<div id="tab-01">
						<ul class="dropdown-menu" id="menu1">
							<li>
								<a href="javascript:;" rel="reload">刷新标签页</a>
							</li>
							<li>
								<a href="javascript:;" rel="close">关闭标签页</a>
							</li>
							<li>
								<a href="javascript:;" rel="closeOther">关闭其他标签页</a>
							</li>
							<li>
								<a href="javascript:;" rel="closeAll">关闭全部标签页</a>
							</li>
						</ul>
						<ul class="nav nav-tabs" context-menu="menu1" style="margin-right:48px">
							<li class="active ">
								<a ptabid="home" tabid="home" href="#home" data-href="firstpage.jsp" style="text-align:center">首&nbsp;&nbsp;&nbsp;&nbsp;页</a>
							</li>
						</ul>
						<div class="tab-btn">
							<a href="javascript:;" data-toggle="dropdown" class="dropdown-toggle more"><i></i></a>
							<ul class="dropdown-menu">
							</ul>
						</div>
						<div class="tab-content layoutBox">
							<div class="tab-pane active" id="home">
									<div style="">
										<ww:include page="firstpage.jsp"/>
									</div>
							</div>
						</div>
					</div>
				</div>
    		</div>
    	<!--
    	<footer class="footer text-center">
    		<div class="footer-inner">
				2013 © MMMMMM by LLLLL.
			</div>
    	</footer>	
    	-->
 	<script type="text/javascript" src="cssuinew/plugins/underscore-min.js"></script>
    <script type="text/javascript" src="cssuinew/plugins/jquery.cookie.min.js"></script>
    <script type="text/javascript" src="cssuinew/js/urlloader.js?v=1"></script>
    <script type="text/javascript" src="cssuinew/plugins/bootstrap/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="cssuinew/plugins/jquery.validate.js"></script>
    <script type="text/javascript" src="cssuinew/plugins/encrypt/md5.js"></script>
    <script type="text/javascript" src="cssuinew/plugins/jquery.blockui.min.js"></script>
    <script type="text/javascript" src="cssuinew/plugins/lhgdialog/lhgdialog.min.js?skin=add"></script>
  	<script type="text/javascript" src="cssuinew/plugins/My97DatePicker/WdatePicker.js"></script>
  	<script type="text/javascript" src="cssuinew/plugins/cssuploader/js/file.js"></script>

     <script type="text/javascript" src="cssuinew/js/common.js"></script>
     <script type="text/javascript" src="cssuinew/js/css.core.js"></script>
     <script type="text/javascript" src="cssuinew/js/contextmenu.js"></script>
     <script type="text/javascript" src="cssuinew/js/table.js"></script>
     <script type="text/javascript" src="cssuinew/js/navtab.js"></script>
     <script type="text/javascript" src="cssuinew/js/action.js"></script>
     <script type="text/javascript" src="cssuinew/js/myapp.js"></script>
     <!-- <script type="text/javascript" src="cssuinew/js/tabsform.js"></script> -->


    <script type="text/javascript">
    /* $('.page-sidebar').resizable({handles:'e',onResize:function(){
    }}); */
    g_user={id:'<ww:property value="#session.sUser.userId" />',name:'<ww:property value="#session.sUser.realName" />',loginName:'<ww:property value="#session.sUser.loginName" />'};
    function showSetting() {
    	//$("#settingLi").children().eq(0).click();
    	$navTab.openTab({
            id:'F_0169',
            title:'设置',
            url:'getUserSettings.action',
            active:true
        });
    }                                            
    function showDevice() {
    	$navTab.openTab({
    		id:'SBGL',
            title:'设备管理',
            url:'dirPersonalDev.action',
            active:true
        });
    }
    function sumDevice() {
    	$css.openDialog({
    		id:'SBTJ',
            title:'用户设备统计',
            url:'dirDeviceTotal.action',
            lock:true
        });
    }
    function showTheme(){
    	$css.openDialog({
    		title:"选择主题风格",
    		url:"getThemeChange.action",
    		lock:false
    	});
    }
    function clearCache() {
    	$.post("clearCache.action", {}, function(data) {
        	$css.tip(data.msg);
        },"json");
    }
    //全文检索搜索
    function tabSearch(){
        var key = $('#tabkey').val();
    	/*$css.post('searchIndex.action',{'gwQ':key,'gwType':""},function(data){
			$('#searchContent',$tab).html(data);
		},'html');*/
		//debugger;
		var url  = "searchIndex.action?gwQ="+encodeURIComponent(key)+"&gwType=''&tabFlag='tabFlag'";
		if($('#SSGL').html()){
			$css.post('searchIndex.action',{'gwQ':encodeURIComponent(key),'gwType':"",tabFlag:'tabFlag'},function(data){
				$('#SSGL').html(data);
			},'html');
		}else{
			$('#tab-01').cssTab('addTab',{
	            id:'SSGL',
	            title:'全文检索',
	            url:url,
	            active:true
	        });
		}
    }
    function dirCategory(){
		var val=$.cookie('css_category_cookie');
		if(isnull(val))
			val='1';
		var bbs={};
		bbs.id="M006-2";
		bbs.title="分类浏览";
		bbs.url='dirCategoryMain.action?mod='+val;
		$navTab.openTab(bbs);
	}
    function dirBbs(forumId){
		var val=$.cookie('css_bbs_cookie');
		if(isnull(val))
			val='1';
		var bbs={};
		bbs.id="JLLT";
		bbs.title="交流论坛";
		bbs.url='dirBbs.action?mod='+val+'&forumId='+forumId;
		$navTab.openTab(bbs);
	}     
    /*$(function() {
		$css.post('firstPage.action',function(data){
			$("#home").html(data);
			$('[href="#home"]').data("loaded",1);
		},'json');
    });*/
    $(function(){
		$('#tabkey').bind('keydown',function(e){
			if(e.keyCode == 13){
				tabSearch();
			}
		});
    });
    var $t = $('[rel="RZGL-TJTB"]');
    if($t[0]){
        $t.attr('iframe','true');
    }
    </script>
  </body>
</html>